﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using SLRT.business.src;
using System.ComponentModel;

namespace SLRT
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainView mainView;
        public MainWindow()
        {
            InitializeComponent();
            this.WindowState = WindowState.Maximized;
            this.WindowStyle = WindowStyle.None;
            Button button = new Button();
            button.Content = "Start";
            button.Click += new RoutedEventHandler(button_Click);
            this.MainGrid.Children.Add(button);
            this.Closing += new CancelEventHandler(MainWindow_Closing);
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
        }

        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            CaptureModel.Instance.View = this;

        }

        void button_Click(object sender, RoutedEventArgs e)
        {
            String pluginName = (String)((Button)sender).Content;
            this.MainGrid.Children.Clear();
            this.mainView = new MainView();
            this.MainGrid.Children.Add(mainView);
        }

        void MainWindow_Closing(object sender, CancelEventArgs e)
        {
            Environment.Exit(0);
        }
    }
}
